* Add 'DiffViewHeader' hook called before diff page output
authorBrion Vibber <brion@users.mediawiki.org>
Wed, 24 May 2006 09:05:49 +0000 (09:05 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Wed, 24 May 2006 09:05:49 +0000 (09:05 +0000)
RELEASE-NOTES
docs/hooks.txt
includes/DifferenceEngine.php

index 6eec82c..3c14858 100644 (file)
@@ -321,6 +321,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * Only the first __TOC__ is now turned into a TOC
 * (bug 4610) Indicate patrolled status on watchlists and allow users to mark
   changes as patrolled using the diff links there
+* Add 'DiffViewHeader' hook called before diff page output
+
 
 == Compatibility ==
 
index f39165a..48b8e17 100644 (file)
@@ -297,6 +297,11 @@ $user: the user _doing_ the block (not the one being blocked)
 $block: the Block object that was saved
 $user: the user who did the block (not the one being blocked)
 
+'DiffViewHeader': called before diff display
+$diff: DifferenceEngine object that's calling
+$oldRev: Revision object of the "old" revision (may be null/invalid)
+$newRev: Revision object of the "new" revision
+
 'EditFilter': Perform checks on an edit
 $editor: Edit form (see includes/EditPage.php)
 $text: Contents of the edit box
index 3a1cd71..67a7f10 100644 (file)
@@ -114,6 +114,9 @@ CONTROL;
                        wfProfileOut( $fname );
                        return;
                }
+               
+               wfRunHooks( 'DiffViewHeader', array( $this, $this->mOldRev, $this->mNewRev ) );
+
                if ( $this->mNewRev->isCurrent() ) {
                        $wgOut->setArticleFlag( true );
                }